package com.ruoyi.db.sms.domain;

import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 优惠券用户关联对象 sms_coupon_user
 *
 * @author yfy
 * @date 2020-04-26
 */

@ApiModel("优惠券用户关联实体类")
@Data
@EqualsAndHashCode(callSuper=true)
public class SmsCouponUser extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("优惠券用户ID")
    private Long id;

    @ApiModelProperty("用户ID")
    @Excel(name = "用户ID")
    @NotBlank(message = "用户ID不能为空")
    private Long userId;

    @ApiModelProperty("优惠券ID")
    @Excel(name = "优惠券ID")
    @NotBlank(message = "优惠券ID不能为空")
    private Long couponId;

    @ApiModelProperty("使用状态（0为未使用 1为已使用 2为已过期 3为已经下架）")
    @Excel(name = "使用状态", readConverterExp = "0=为未使用,1=为已使用,2=为已过期,3=为已经下架")
    private Integer status;

    @ApiModelProperty("使用时间")
    @Excel(name = "使用时间", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDateTime usedTime;

    @ApiModelProperty("开始时间")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDateTime startTime;

    @ApiModelProperty("截至时间")
    @Excel(name = "截至时间", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDateTime endTime;

    @ApiModelProperty("订单ID")
    @Excel(name = "订单ID")
    private Long orderId;

    @ApiModelProperty("创建时间")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDateTime addTime;

    @ApiModelProperty("逻辑删除")
    private Integer deleted;
}
